/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entityBeans;

import java.io.Serializable;
import java.util.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 *
 * @author allankv
 */
@Entity
@Table(name = "culture")
@NamedQueries({
    @NamedQuery(name = "Culture.findAll", query = "SELECT c FROM Culture c"),
    @NamedQuery(name = "Culture.findByIdculture", query = "SELECT c FROM Culture c WHERE c.idculture = :idculture"),
    @NamedQuery(name = "Culture.findByCulture", query = "SELECT c FROM Culture c WHERE c.culture = :culture")})
public class Culture implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idculture")
    private Integer idculture;
    @Column(name = "culture")
    private String culture;
    @OneToMany(mappedBy = "culture", fetch = FetchType.LAZY)
    private List<Monitoring> monitoringList;

    public Culture() {
    }

    public Culture(Integer idculture) {
        this.idculture = idculture;
    }

    public Integer getIdculture() {
        return idculture;
    }

    public void setIdculture(Integer idculture) {
        this.idculture = idculture;
    }

    public String getCulture() {
        return culture;
    }

    public void setCulture(String culture) {
        this.culture = culture;
    }

    public List<Monitoring> getMonitoringList() {
        return monitoringList;
    }

    public void setMonitoringList(List<Monitoring> monitoringList) {
        this.monitoringList = monitoringList;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idculture != null ? idculture.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Culture)) {
            return false;
        }
        Culture other = (Culture) object;
        if ((this.idculture == null && other.idculture != null) || (this.idculture != null && !this.idculture.equals(other.idculture))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityBeans.Culture[idculture=" + idculture + "]";
    }

}
